package cn.wolfcode.luowowo.ticket.service.impl;

import cn.wolfcode.luowowo.ticket.domain.TicketSale;
import cn.wolfcode.luowowo.ticket.mapper.TicketSaleMapper;
import cn.wolfcode.luowowo.ticket.service.ITicketSaleService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class TicketSaleServiceImpl implements ITicketSaleService {
    @Autowired
    private TicketSaleMapper ticketSaleMapper;


    @Override
    public List<TicketSale> selectAll() {
        return ticketSaleMapper.selectAll();
    }

    @Override
    public TicketSale get(Long id) {
        return ticketSaleMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<TicketSale> selectSaleByTicketId(Long tid) {
        return ticketSaleMapper.selectSaleByTicketId(tid);
    }

    @Override
    public TicketSale selectSaleByIdAndTicketId(Long id, Long tid) {
        return ticketSaleMapper.selectSaleByIdAndTicketId(id, tid);
    }
}
